const mongoose = require("mongoose")
const {model, Schema} = mongoose
// 作品表
const schema = new Schema({
    userID: {
        type: mongoose.Schema.Types.ObjectId, ref: 'User'
    },
    isTeam: {
        type: Boolean
    },
    contestID: {
        type: mongoose.Schema.Types.ObjectId, ref: 'Contest'
    },
    scoreID: {
        type: mongoose.Schema.Types.ObjectId, ref: 'Score'
    },
    teamID: {
        type: String
    },
    path: {
        type: String
    },
    status: {
        type: Number,
        default: 0
    },
    createTime: {
        type: Date,
        default: new Date()
    },
    updateTime: {
        type: Date,
        default: new Date()
    }
})
const Work = model("Work", schema)
module.exports = Work